﻿#include "ssCircle.h"


namespace StarSeeker
{

ssCircle::ssCircle(void)
{
	Zero();
}

ssCircle::ssCircle(ssfloat x, ssfloat y, ssfloat radius)
{
	Set(x, y, radius);
}

void ssCircle::Set(ssfloat x, ssfloat y, ssfloat radius)
{
	m_center.Set(x, y);
	m_radius = radius;
}

void ssCircle::Zero()
{
	m_center.Zero();
	m_radius = 0.0f;
}

bool ssCircle::PointIsInside(ssfloat x, ssfloat y)
{
	ssVector2 p(x,y);
	return PointIsInside(p);
}

bool ssCircle::PointIsInside(ssVector2 & p)
{
	return (p - m_center).SquaredLength() < m_radius*m_radius;
}

}
